
#ifndef SPI     // allow3s file to be multiply included
#define SPI

#define  NO     0
#define  YES    1
#define  FALSE  0
#define  TRUE   1
#define  OFF    0
#define  ON     1
#define  ENABLE 1
#define  DISABLE 0

/** SCK relation with oscillator frequency **/
/** SCK frequency = Oscillator Frequency divided with X **/
#define FREQ_DIV_2      4    //FREQ_DIV_4 or lower is only guaranteed to work in slave mode
#define FREQ_DIV_4      0
#define FREQ_DIV_8      5
#define FREQ_DIV_16     1
#define FREQ_DIV_32     6
#define FREQ_DIV_64     2
#define FREQ_DIV_128    3


void init_SPI(void);
void SPI_transmit(char cData);
unsigned char SPI_read();

#endif
